package com.lagou.product_springcloud.service.impl;

import com.lagou.product_springcloud.mapper.ProductsMapper;
import com.lagou.product_springcloud.pojo.Products;
import com.lagou.product_springcloud.service.ProductsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ProductsServiceImpl implements ProductsService {

    @Autowired
    private ProductsMapper productsMapper;

    @Override
    public Integer insertProduct(Products products) {
        productsMapper.insertProduct(products);
        return products.getId();
    }
}
